﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="FilterPropertyValue.cs" company="ScRePt">
//   Copyright © ScRePt 2010 - 2012
// </copyright>
// <summary>
//   The filter property value.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace MP3D.Configuration
{
    #region Using Directives

    using System;
    using System.Xml.Serialization;

    using Helper;

    #endregion

    /// <summary>
    /// The filter property value.
    /// </summary>
    [Serializable]
    [XmlInclude(typeof(FilterPropertyValueEnum))]
    public class FilterPropertyValue
    {
        #region Properties

        /// <summary>
        /// Gets DisplayName.
        /// </summary>
        public string DisplayName
        {
            get
            {
                return this.ToString();
            }
        }

        /// <summary>
        /// Gets or sets a value indicating whether Enabled.
        /// </summary>
        [XmlAttribute]
        public bool Enabled { get; set; }

        /// <summary>
        /// Gets or sets Id.
        /// </summary>
        [XmlAttribute]
        public int Id { get; set; }

        /// <summary>
        /// Gets or sets Name.
        /// </summary>
        [XmlAttribute]
        public string Name { get; set; }

        /// <summary>
        /// Gets Self.
        /// </summary>
        public FilterPropertyValue Self
        {
            get
            {
                return this;
            }
        }

        /// <summary>
        /// Gets or sets a value indicating whether Supported.
        /// </summary>
        [XmlAttribute]
        public bool Supported { get; set; }

        /// <summary>
        /// Gets or sets Value.
        /// </summary>
        [XmlAttribute]
        public int Value { get; set; }

        #endregion

        #region Public Methods

        /// <summary>
        /// The to string.
        /// </summary>
        /// <returns>
        /// The to string.
        /// </returns>
        public override string ToString()
        {
            return Translations.GetByName(this.Name);
        }

        #endregion
    }
}